<%--
    Document   : userList
    Created on : 8 Mar, 2012, 8:52:07 AM
    Author     : Akil Mahimwala
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="../common/script.jsp" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="../common/title.jsp" %>
    </head>
    <body>
        <%@include file="../common/header.jsp" %>
        <%@include file="../common/menu.jsp" %>
        <div class="in_02">
            <%@include file="../common/message.jsp" %>
            <br/> &nbsp;&nbsp;&nbsp;
            <span style="font-size: 15px; font-weight: bold;"><a href="../admin/userAdd.htm">Add user</a></span>
            <br/><br/>
            &nbsp;&nbsp;&nbsp;&nbsp;<strong style="margin:0 440px 0 0"><spring:message code="title.userList"/></strong>
            <c:out value="${fn:length(userList)}"/> <spring:message code="rowsFound"/>
            <table border="1px" class="data_table">
                    <tr class="header">
                        <th><spring:message code="userId"/></th>
                        <th><spring:message code="username"/></th>
                        <th><spring:message code="role"/></th>
                        <th><spring:message code="active"/></th>
                        <th><spring:message code="expired"/></th>
                        <th><spring:message code="expiresOn"/></th>
                        <th width="80px"><spring:message code="failedAttempts"/></th>
                        <th width="10"></th>
                        <th width="80px"><spring:message code="resetFailedAttempts"/></th>
                    </tr>
                    <c:forEach items="${userList}" var="userItem">
                    <tr>
                        <td align="center"><c:out value="${userItem.userId}"/></td>
                        <td align="center"><c:out value="${userItem.username}"/></td>
                        <td align="center"><c:out value="${userItem.role.roleName}"/></td>
                        <td align="center"><c:out value="${userItem.active}"/></td>
                        <td align="center"><c:out value="${userItem.expired}"/></td>
                        <td align="center"><c:out value="${userItem.expiresOn}"/></td>
                        <td align="center"><c:out value="${userItem.failedAttempts}"/></td>
                        <td><a href="userEdit.htm?userId=<c:out value="${userItem.userId}"/>"><img src="../images/edit.png"  width="20" height="20" style="border: none" alt="Edit" title="Edit"/></a></td>
                        <td align="center"><a href="resetFailedAttempts.htm?userId=<c:out value="${userItem.userId}"/>"><img src="../images/reset-button.png"  width="20" height="20" style="border: none" alt="Reset Failed Attempts" title="Reset Failed Attempts"/></a></td>
                    </tr>
                </c:forEach>
            </table>
            &nbsp;&nbsp;&nbsp;<c:out value="${fn:length(userList)}"/> <spring:message code="rowsFound"/>
            <br/><br/> &nbsp;&nbsp;&nbsp;
            <span style="font-size: 15px; font-weight: bold;"><a href="../admin/userAdd.htm">Add user</a></span>    


        </div>
    </body>
</html>
